import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';

class MySwiper extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => MySwiperState();
}

class MySwiperState extends State {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('MySwiper')),
      body: Container(
        width: double.infinity,
        child: AspectRatio(
          aspectRatio: 14 / 9,
          child: Swiper(
            itemBuilder: (BuildContext context, int index) {
              return new Image.asset(
                "images/2.png",
                fit: BoxFit.fill,
              );
            },
            itemCount: 3,
            pagination: new SwiperPagination(),
            control: new SwiperControl(),
          ),
        ),
      ),
    );
  }
}
